<html>
<head>
    <title>Title</title>
</head>
<body>
    <center>
        <table border="1" rules="all">
            <tr align="center" bgcolor="cyan">
                <th>
                    员工编号
                </th>
                <th>
                    员工姓名
                </th>
                <th>
                    角色
                </th>
                <th>
                    账户状态
                </th>
                <th colspan="100">
                    操作
                </th>
            </tr>
            <#list list as u>
                <tr align="center">
                    <td>${u.id}</td>
                    <td>${u.uname}</td>
                    <td>${u.rb.rname!}</td>
                    <td>${(u.status==0)?string('正常','冻结')}</td>
                    <td>
                        <button type="button" onclick="userlock(${u.id},${u.status})">${(u.status==0)?string('冻结','解冻')}</button>
                    </td>
                    <td><a href="toUserRole.do?id=${u.id}"><button>分配角色</button></a></td>
                    <td><button onclick="lookpower('${u.id}')">查看权限</button></td>
                </tr>
            </#list>
        </table>
    </center>
</body>
<script>
    function userlock(id,status) {
        location.href="changeUserStatus.do?id="+id+"&status="+status;
    }
    function lookpower(id) {
        window.open("getUserPower.do?id="+id,"","height=300px,width=300px");
    }
</script>
</html>
